<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWordTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('word', function (Blueprint $table) {
            $table->increments('id');
            /**
             * 唯一标识
             */
            $table->string('key', 20);
            /**
             * 作者
             */
            $table->string('author', 20);
            /**
             * 内容
             */
            $table->string('content', 2048);
            /**
             * 解释相关
             */
            $table->text('explain');
            $table->tinyInteger('type');
            $table->tinyInteger("is_deleted");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('word');
    }
}
